package javabase.schoolwork.day6_14;

import java.io.IOException;
import java.io.PipedOutputStream;

/**
 * @author fance
 * @date 2018/6/14 22:45
 */
public class WriteData {
    public void write(PipedOutputStream out) {
        try { System.out.println("write: ");
        for (int i = 0; i < 300; i++) {
            String outData = "" + i;

                out.write(outData.getBytes());
            System.out.print(outData);
        }
            System.out.println();
        out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
